$(function(){
	
	$("#all").css({
		"margin":"50px auto",
		"width":"500px"
	});
	
	$("ul").css({
		"list-style":"none",
		"padding":"0px",
		"margin":"0px"
	});
	
	$(".fr").css({
		"float":"right"
	});
	
	
	
	$("#sub").unbind("click").bind("click", function(){
		if($("#rcontent").val() == ""){
			alert("请输入内容！");
			return false;
		}
		
		var rcontent = $("#rcontent").val();
		var id = $("#rcontent").next().val();
		
		$.ajax({
			url:"AddReplyServlet",
			type:"post",
			data:{"rcontent":rcontent,"id":id},
			dataType:"text",
			async:false,
			success:function(result){
				alert(result);
				window.location = "ShowOneServlet?id=" + id;
			}
			
		});
		
		
	});
	
	
	
});

